﻿//-----------------------------------------------------------------------
// <copyright file="MLCompilationResults.cs" company="MAPILab Ltd">
//     Copyright (c) MAPILab Ltd.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace MAPILab.SharePoint.Explorer.Utilities.ScriptRunner
{
    using System.Collections.Specialized;
    using System.Reflection;

    /// <summary>
    /// Class that contains the results of compilation
    /// </summary>
    internal class MLCompilationResults
    {
        #region Fields

        /// <summary>
        /// extacted assembly
        /// </summary>
        protected Assembly assembly = null;

        /// <summary>
        /// Errors collection
        /// </summary>
        protected StringCollection errorsCollection = new StringCollection();

        /// <summary>
        /// Warnings collections
        /// </summary>
        protected StringCollection warningsCollection = new StringCollection();

        #endregion

        #region Members

        /// <summary>
        /// Gets assembly
        /// </summary>
        public Assembly Assembly
        {
            get { return this.assembly; }
        }

        /// <summary>
        /// Gets errors collection
        /// </summary>
        public StringCollection ErrorsCollection
        {
            get { return this.errorsCollection; }
        }

        /// <summary>
        /// Gets warnings collections
        /// </summary>
        public StringCollection WarningsCollection
        {
            get { return this.warningsCollection; }
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="assembly">Assembly</param>
        /// <param name="errorsCollection">Errors collection</param>
        /// <param name="warningsCollection">Warnings collections</param>
        public MLCompilationResults(Assembly assembly, StringCollection errorsCollection, StringCollection warningsCollection)
        {
            this.assembly = assembly;
            this.errorsCollection = errorsCollection;
            this.warningsCollection = warningsCollection;
        }

        #endregion
    }

}
